package com.csun.cmny.provider.dao;


import com.csun.cmny.base.dto.CacReturnDto;
import com.csun.cmny.provider.pojo.CacOldmanMinor;
import com.csun.cmny.provider.pojo.CacOldmanMinorKey;
import com.csun.cmny.provider.pojo.CacOldmanMinorPojo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface CacOldmanMinorMapper {
    int deleteByPrimaryKey(CacOldmanMinorKey key);

    int insert(CacOldmanMinor record);

    int insertSelective(CacOldmanMinor record);

    CacOldmanMinor selectByPrimaryKey(CacOldmanMinorKey key);

    int updateByPrimaryKeySelective(CacOldmanMinor record);

    int updateByPrimaryKey(CacOldmanMinor record);

    /**
     * 批量添加老人小项关系数据
     * author:liqian
     * date:2018-11-02 14:01
     */
    int insertBatch(List<CacOldmanMinor> cacOldmanMinors);

    /**
     * 根据CacOldmanMinor删除相关数据，可以具体只删除一个，也可以批量删除，看给的数据的精确度
     * author:liqian
     * date:2018-11-02 15:37
     */
    int delByOidAndCacId(CacOldmanMinor cacOldmanMinor);

    /**
     * 根据老人id和评估id查询
     * author:liqian
     * date:2018-11-02 15:49
     */
    List<Map<String, Object>> selectCacOldMnr(CacOldmanMinor cacOldmanMinor);

    int deleteByOldmanId(Integer oldmanId);

    List<CacReturnDto> selectByOldmanId(@Param(value = "oldmanId") Integer oldmanId);

    int newInsertBatch(List<CacOldmanMinorPojo> list);
}